#ifndef  __STRATEGY_ENGINE_H_
#define  __STRATEGY_ENGINE_H_

#include "logger.h"
#include "strategy.h"
#include "strategy_info.h"
#include "plugin_helper.h"
#include "communication_manager.h"

#include <libxml/tree.h>
#include <stdio.h>
#include <string>
#include <vector>

class StrategyEngine
{
public:
    StrategyEngine(){}
    ~StrategyEngine();
    bool Init(CommunicationManager* cManager, xmlNodePtr engineNode);
    bool Run(CommunicationManager* cManager);
    void ResetStrategys(CommunicationManager* cManager);
    StrategyInfo* GetStrategyInfo(const std::string& name);
private:
    bool InitConfig(StrategyInfo* resourceInfo, xmlNodePtr configNode);
    std::map<std::string, StrategyInfo*> m_StrateInfoMap;
    std::vector<Strategy*> m_strategies;
};















#endif  //__STRATEGY_ENGINE_H_

/* vim: set expandtab ts=4 sw=4 sts=4 tw=100: */
